package com.yloveg.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yloveg.dao.UserInfoMapper;
import com.yloveg.entity.UserInfo;
import com.yloveg.service.UserInfoService;

@Service
public class UserInfoServiceImpl implements UserInfoService {
 
    @Autowired
    private UserInfoMapper userInfoMapper;

	@Override
	public int insertUserInfo(UserInfo info) {
		info.setState(1);
		return userInfoMapper.insert(info);
	}

	@Override
	public List<UserInfo> queryUserInfo(Map<String,Object> map) {
		// TODO Auto-generated method stub
		return userInfoMapper.selectByTerm(map);
	}

	@Override
	public UserInfo queryOneUserInfo(UserInfo info) {
		return userInfoMapper.queryOneUserInfo(info);
	}

	@Override
	public int updateUserInfo(UserInfo info) {
		return userInfoMapper.updateByPrimaryKeySelective(info);
	}


 
 


}
